package com.sky.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author 尹稳健~
 * @version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("博客类")
public class Blog {
    @ApiModelProperty("博客id")
    private Long id;
    @ApiModelProperty("博客标题")
    private String title;
    @ApiModelProperty("博客内容")
    private String content;
    @ApiModelProperty("博客首页图片名称")
    private String firstPicture;
    @ApiModelProperty("原创|转载")
    private String flag;
    @ApiModelProperty("博客点击数")
    private Integer views;
    @ApiModelProperty("博客评论数")
    private Integer commentCount;
    @ApiModelProperty("博客打赏")
    private boolean appreciation;
    @ApiModelProperty("博客转载声明")
    private boolean shareStatement;
    @ApiModelProperty("博客评论")
    private boolean commentOpen;
    @ApiModelProperty("博客出版")
    private boolean published;
    @ApiModelProperty("博客推荐")
    private boolean recommend;
    private Date createTime;
    private Date updateTime;

    private Long typeId;
    private Long userId;
    private String tagIds;
    @ApiModelProperty("博客描述")
    private String description;
    //多对一
    private Type type;
    private User user;
    //多对多
    private List<Tag> tags = new ArrayList<>();
    //一对多
    private List<Comment> comments = new ArrayList<>();
}
